<!doctype html>
<html lang="zh-cn">

	<head>
		<meta charset="utf-8">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="heimdall" content="首页">
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/header.css" />
		<link rel="stylesheet" href="__PUBLIC__/css/c.css" />
		<link rel="stylesheet" href="__PUBLIC__/css/tuihuo.css" />
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/footer.css"/>
	</head>

	<body>
<!--	头部  shop_pavilion.html-->
	<include file="./Application/Home/View/Public/head2.html"/>

<!--主体-->
		<div class="tui">
			<form method="post" action="{:U(shop_tuihuo)}" enctype="multipart/form-data" class="ajax-form" onsubmit="return check();">
				<input type="hidden" name="order_id" value="{$orderInfo['order_id']}">
				<input type="hidden" name="order_status" value="{$order_status}">
				<input type="hidden" name="p" value="{$p}">
				<div class="tui_zuo">
					<div class="zuo1">
						<div>换货商品：</div>
						<div><img src="__ROOT__{$orderInfo['good_picture']}" /></div>
						<div>
							<p>商品名称:{$orderInfo['good_name']}</p>
							<p>规格:{$orderInfo['grade']}</p>
						</div>
					</div>
					<div style="clear: both;"></div>
					<!--<div class="zuo2">-->
						<!--<div>类型：</div>-->
						<!--<div>-->
							<!--<p><input type="radio" name="order_status" value="4" />换货</p>-->
							<!--<p><input type="radio" name="order_status" value="7" />退货</p>-->
						<!--</div>-->
					<!--</div>-->
					<div class="zuo1">
						<div class="fl">退货数量：</div>
						<div style="margin-top: 32px;">
							<input type="number" min="1" max="{$orderInfo['num']}" id="num" class="ui-input w120 buyCount" name="return_num" value="1" >
						</div>
					</div>
					<div style="clear: both;"></div>
					<div class="zuo3">
						<div>换货原因：</div>
						<div>
							<textarea name="return_reason" id="excel_file" rows="" cols=""></textarea>
						</div>
					</div>
					<div style="clear: both;"></div>
					<p style="padding-left: 74px;color: red;display: none;" class="wenben">*文本内容不能为空</p>
					<div class="zuo4">
						<div>上传包装盒前后左右四张图片</div>
						<div class="zuoimg_left">上传正面：<br />
							<span style="color: red;display: none;" class="upimg">*正面图片不能为空</span>
						</div>
						<img src=""  id="blah" style="width:100px;height:100px;float:left;margin-right:10px;display: none;"/>
						<div class="zuoimg_right" style="background:url(__PUBLIC__/img/jia.png);background-size:cover;width: 100px;display: inline-block;">
							<input type='file' name="front"  id="front" class="imgInp" style="width: 100px;height: 100px;opacity: 0;"/>
						</div>

						<div class="zuoimg_left">上传反面：<br />
							<span style="color: red;display: none;" class="downimg">*反面图片不能为空</span>
						</div>
						<img src="" id="blah" style="width:100px;height:100px;float:left;margin-right:10px;display: none;"/>
						<div class="zuoimg_right" style="background:url(__PUBLIC__/img/jia.png);background-size:cover;width: 100px;display: inline-block;">
							<input type='file' name="reverse" id="reverse" class="imgInp" style="width: 100px;height: 100px;opacity: 0;"/>
						</div>
						<div style="clear: both;"></div>
						<div class="zuoimg_left">上传左面：<br />
							<span style="color: red;display: none;" class="leftimg">*左面图片不能为空</span>
						</div>
						<img src="" id="blah" style="width:100px;height:100px;float:left;margin-right:10px;display: none;"/>
						<div class="zuoimg_right" style="background:url(__PUBLIC__/img/jia.png);background-size:cover;width: 100px;display: inline-block;">
							<input type='file' name="left" id="left" class="imgInp" style="width: 100px;height: 100px;opacity: 0;"/>
						</div>

						<div class="zuoimg_left">上传右面：<br />
							<span style="color: red;display: none;" class="rightimg">*右面图片不能为空</span>
						</div>
						<img src="" id="blah" style="width:100px;height:100px;float:left;margin-right:10px;display: none;"/>
						<div class="zuoimg_right" style="background:url(__PUBLIC__/img/jia.png);background-size:cover;width: 100px;display: inline-block;">
							<input type='file' name="right" id="right" class="imgInp" style="width: 100px;height: 100px;opacity: 0;"/>
						</div>
						<div style="clear: both;"></div>
					</div>
					<div class="zuo5">
						<input type="submit" value="提交">
					</div>
				</div>
			</form>
			<div class="tui_you">
				<div>订单详情</div>
				<div>
					<div>
						<img src="__ROOT__{$orderInfo['good_picture']}" />
					</div>
					<div>
						<p>商品名称:{$orderInfo['good_name']}</p>
						<p>规格:{$orderInfo['grade']}</p>
					</div>
				</div>
				<div style="clear: both;"></div>
				<div>
					<div>
						<span>订单编号：</span>
						<span>{$orderInfo['order_number']}</span>
					</div>
					<div>
						<span>物流单号：</span>
						<span>{$orderInfo['tracking_number']}</span>
					</div>
					<div>
						<span>商品单价：</span>
						<span>{$orderInfo['price']}</span>
					</div>
					<div>
						<span>数量：</span>
						<span>{$orderInfo['num']}</span>
					</div>
					<div>
						<span>运费：</span>
						<span style="color: red;">包邮</span>
					</div>
					<div>
						<span>上门安装：</span>
						<span>
							<if condition="$orderInfo['is_install'] eq 1">
								需要
								<else />
								不需要
							</if>
						</span>
					</div>
					<div>
						<span>安装费：</span>
						<span>
							<if condition="$orderInfo['install_price'] eq ''">
								无
							<else />
								￥{$orderInfo['install_price']}
							</if>
						</span>
					</div>
					<div>
						<span>商品总价：</span>
						<span>
							￥{$orderInfo['price']*$orderInfo['num']+$orderInfo['freight']+$orderInfo['install_price']}
						</span>
					</div>
					<div>
						<span>收货人：</span>
						<span>{$orderInfo['receiver']}</span>
					</div>
					<div>
						<span>联系电话：</span>
						<span>{$orderInfo['phone']}</span>
					</div>
					<div>
						<span>收货地址：</span>
						<span>{$orderInfo['province']}{$orderInfo['city']}{$orderInfo['county']}{$orderInfo['detailed_address']}</span>
					</div>
					<div>
						<span>订单状态：</span>
						<span>
							<switch name="orderInfo['order_status']">
								<case value="-1">已取消</case>
								<case value="0">待支付</case>
								<case value="1">待发货</case>
								<case value="2">待收货</case>
								<case value="3">已收货</case>
								<case value="4">申请换货</case>
								<case value="5">确认换货</case>
								<case value="6">已换货</case>
								<case value="7">申请退货</case>
								<case value="8">确认退货</case>
								<case value="9">已退货</case>
							</switch>
						</span>
					</div>
					<div>
						<span>下单时间：</span>
						<span>{$orderInfo['add_time']}</span>
					</div>
					<div>
						<span>发货时间：</span>
						<span>{$orderInfo['delivery_time']}</span>
					</div>
					<div>
						<span>收货时间：</span>
						<span>{$orderInfo['confirm_time']}</span>
					</div>
				</div>
			</div>
			<div style="clear: both;"></div>
		</div>


	<!--公共底部-->
	<include file="./Application/Home/view/Public/footer.html"/>
	</body>
	<script>
		//换货原因不能为空判断
		function check() {
			var v = $("#excel_file").val();
			var front = $("#front").val();
			var reverse = $("#reverse").val();
			var left = $("#left").val();
			var right = $("#right").val();
			if (v.length == 0 || v.match(/^\s+$/g)) {
				$('.wenben').show();
				return false;
			}else{
				$('.wenben').hide();
			}

			if (front.length == 0) {
				$('.upimg').show()
				return false;
			}else{
				$('.upimg').hide();
			}

			if (reverse.length == 0) {
				$('.downimg').show()
				return false;
			}else{
				$('.downimg').hide();
			}

			if (left.length == 0) {
				$('.leftimg').show()
				return false;
			}else{
				$('.leftimg').hide();
			}

			if (right.length == 0) {
				$('.rightimg').show()
				return false;
			}else {
				$('.rightimg').hide();
				return true;
			}
		}

		$('.side-nav').find('.side-ul').hide();
		$('.side-nav').hover(function() {
			$(this).find('.side-ul').show();
		}, function() {
			$(this).find('.side-ul').hide();
		})
		$('.side-ul> li').hover(function() {
			$(this).css('background', '#fff').find('a:first-child').css('color', '#000');
			$(this).find('.nav-items').show();
		}, function() {
			$(this).css('background', '#4f4f4f').find('a:first-child').css('color', '#fff');
			$(this).find('.nav-items').hide();
		})
	</script>
<script>
	function readURL(input,thisimg) {
   if (input.files && input.files[0]) {

       var reader = new FileReader();

       reader.onload = function (e) {
         thisimg.parent().prev().attr('src', e.target.result).show();
       }
       reader.readAsDataURL(input.files[0]);

   }
}

$(".imgInp").change(function(){

   readURL(this,$(this));

});
</script>

</html>